
<link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/skill.css" />

<script type="text/javascript" src="<?php echo Yii::app()->theme->baseUrl; ?>/js/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
		$('.plus').hide();
		
		$(".skillHeader").click(function(){
			
			if($($(this).parent().children(".skillBlock")).is(":visible"))
			{
				$(this).children(".minus").hide();
				$(this).children(".plus").show();
			}else
			{
				$(this).children(".minus").show();
				$(this).children(".plus").hide();
			}
			$(this).parent().children(".skillBlock").slideToggle("slow");
		})
	
	
	});
</script>	

 	<div class="padding10"></div>            	
  
	<div id="contentWrapper">
		<!-- Begin rightWrapper -->
		<div id="rightWrapper">	
			<div class ="skillWrapper">
				<div class="skillHeader">
					<img class="minus" title ="thu gọn" src="<?php echo Html::imageUrl("minus.gif");?>" ></img>
					<img class="plus"  title ="mở rộng" src="<?php echo Html::imageUrl("plus.gif");?>" ></img>
					Ngoại Ngữ
				</div>		
				<div id ="foreignLanguage" class="skillBlock">
				<?php
					$uid = Yii::app()->request->getParam('uid');
					
					$form = $this->beginWidget('CActiveForm');
					echo $form->dropDownList($userSkillForm,'user_skill_skill_id',Skill::listSkillName('language'),array('id'=>'foreign'));
				
					echo $form->dropDownList($userSkillForm,'skill_level',Skill::listSkillLevel(),array('id'=>'foreignLevel'));
				
					echo Chtml::label('Số năm sử dụng ',false);
					echo $form->textField($userSkillForm,'experience_year',array('id'=>'skillTime'));
					
					echo Chtml::ajaxSubmitButton('Thêm', $this->createUrl('addSkill',array('uid'=>$uid,'stype'=>'language')),
						array(
							'beforeSend'=>'function() {
								$("#foreignLanguageTotal").addClass("loading");
							}',
							'complete'=>'function(){
								$("#foreignLanguageTotal").removeClass("loading");
							}',
							'update'=>"#foreignLanguageTotal",
						),
						array(
							'id'=>'addLanguage', 'class'=>"skillBtn", 'title'=>'Thêm'
						)
					);
					echo '<div class="padding10"></div>';
					$this->endWidget(); 
				?>
					<div id="foreignLanguageTotal">
						<?php $this->renderPartial('_skill',array('langSkill'=>$langSkill,'stype'=>'language'),false,true);?>
					</div>
				</div>
			
			</div>
			<!-- need repair css Cuong -->
			
			<div class ="skillWrapper">
				<div class="skillHeader">
					<img class="minus" title ="thu gọn" src="<?php echo Html::imageUrl("minus.gif");?>" ></img>
					<img class="plus"  title ="mở rộng" src="<?php echo Html::imageUrl("plus.gif");?>" ></img>
					Programming
				</div>	
				<div id ="programming" class="skillBlock">
					<?php
					$form = $this->beginWidget('CActiveForm');
					echo CHtml::dropDownList('skill-category',null,SkillCategories::listProgram(),array());
				
					echo $form->dropDownList($userSkillForm,'user_skill_skill_id',Skill::listSkillProgram(),array('id'=>'foreign'));
				
					echo $form->dropDownList($userSkillForm,'skill_level',Skill::listSkillLevel(),array('id'=>'foreignLevel'));
				
					echo Chtml::label('Số năm sử dụng ',false);
					echo $form->textField($userSkillForm,'experience_year',array('id'=>'skillTime'));
					
					echo Chtml::ajaxSubmitButton('Thêm', $this->createUrl('addSkill',array('uid'=>$uid,'stype'=>'program')),
						array(
							'beforeSend'=>'function() {
								$("#programmingTotal").addClass("loading");
							}',
							'complete'=>'function(){
								$("#programmingTotal").removeClass("loading");
							}',
							'update'=>"#programmingTotal",
						),
						array(
							'id'=>'addProgram', 'class'=>"skillBtn", 'title'=>'Thêm'
						)
					);
					echo '<div class="padding10"></div>';
					$this->endWidget(); 
						?>
					<div id="programmingTotal">
						<?php $this->renderPartial('_skill',array('langSkill'=>$programSkill,'stype'=>'program'),false,true)?>
					</div>
				</div>
			</div>
			
			<div class ="skillWrapper">
				<div class="skillHeader">
						<img class="minus" title ="thu gọn" src="<?php echo Html::imageUrl("minus.gif");?>" ></img>
						<img class="plus"  title ="mở rộng" src="<?php echo Html::imageUrl("plus.gif");?>" ></img>
						Kỹ Năng Mềm
				</div>	
				<div id ="softSkill" class="skillBlock">
					<?php
						$form = $this->beginWidget('CActiveForm');
						echo $form->dropDownList($userSkillForm,'user_skill_skill_id',Skill::listSkillName('soft skill'),array('id'=>'skillName'));
					
						echo $form->dropDownList($userSkillForm,'skill_level',Skill::listSkillLevel(),array('id'=>'skillLevel'));
					
						echo Chtml::label('Số năm sử dụng ',false);
						echo $form->textField($userSkillForm,'experience_year',array('id'=>'skillTime'));
						
						echo Chtml::ajaxSubmitButton('Thêm', $this->createUrl('addSkill',array('uid'=>$uid,'stype'=>'soft skill')),
							array(
								'beforeSend'=>'function() {
									$("#softSkillTotal").addClass("loading");
								}',
								'complete'=>'function(){
									$("#softSkillTotal").removeClass("loading");
								}',
								'update'=>"#softSkillTotal",
							),
							array(
								'id'=>'addSoftSkill', 'class'=>"skillBtn", 'title'=>'Thêm'
							)
						);
						echo '<div class="padding10"></div>';
						$this->endWidget(); 
					?>
					<div id="softSkillTotal">
						<?php $this->renderPartial('_skill',array('langSkill'=>$softSkill,'stype'=>'soft skill'),false,true)?>
					</div>
				</div>
			</div>
			<!-- End SkillWrapper -->
		</div>
		<!-- End rightWrapper -->
	</div>
	<!-- End contentWrapper -->